package com.harbintransport.backend.model;

import java.io.Serializable;
import java.util.Objects;

public class BusRushHourTrafficId implements Serializable {

    private String stationName;
    private String time;

    public BusRushHourTrafficId() {
    }

    public BusRushHourTrafficId(String stationName, String time) {
        this.stationName = stationName;
        this.time = time;
    }

    // Getters, Setters, equals, and hashCode
    public String getStationName() {
        return stationName;
    }

    public void setStationName(String stationName) {
        this.stationName = stationName;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o)
            return true;
        if (o == null || getClass() != o.getClass())
            return false;
        BusRushHourTrafficId that = (BusRushHourTrafficId) o;
        return Objects.equals(stationName, that.stationName) &&
                Objects.equals(time, that.time);
    }

    @Override
    public int hashCode() {
        return Objects.hash(stationName, time);
    }
}